SET(FLTK_HPP_SRC "")
SET(FLTK_CPP_SRC "")
FLTK_PARSE_FL_FILE(FLTK_HPP_SRC FLTK_CPP_SRC)

AUX_SOURCE_DIRECTORY(. PKGVIEWER_SRC)
ADD_EXECUTABLE(pkgviewer ${PKGVIEWER_SRC} ${FLTK_CPP_SRC})
ADD_DEPENDENCIES(pkgviewer mir2x_3rds)

TARGET_INCLUDE_DIRECTORIES(pkgviewer PRIVATE ${MIR2X_COMMON_SOURCE_DIR})
TARGET_INCLUDE_DIRECTORIES(pkgviewer PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
TARGET_INCLUDE_DIRECTORIES(pkgviewer PRIVATE ${CMAKE_CURRENT_LIST_DIR})

TARGET_LINK_LIBRARIES(pkgviewer ${FLTK_LIBRARIES}  )
TARGET_LINK_LIBRARIES(pkgviewer ${OPENGL_LIBRARIES})
TARGET_LINK_LIBRARIES(pkgviewer ${CMAKE_DL_LIBS}   )
TARGET_LINK_LIBRARIES(pkgviewer common             )
TARGET_LINK_LIBRARIES(pkgviewer ${PNG_LIBRARIES}   )

INSTALL(TARGETS pkgviewer DESTINATION tools/pkgviewer)
